package com.itgaoshu.hospitalproject.service.impl;

import com.itgaoshu.hospitalproject.bean.Ban;
import com.itgaoshu.hospitalproject.bean.Paiban;
import com.itgaoshu.hospitalproject.mapper.PaibanMapper;
import com.itgaoshu.hospitalproject.service.PaibanService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
@Service
@Transactional
public class PaibanServiceImpl implements PaibanService{
    @Autowired
    private PaibanMapper paibanMapper;

    @Override
    public List<Paiban> findAllPaiban(String doctorName) {
        return paibanMapper.findAllPaiban(doctorName);
    }

    @Override
    public List<Ban> findAllBan() {
        return paibanMapper.findAllBan();
    }

    @Override
    public int editPaiban(Paiban paiban) {
        return paibanMapper.editPaiban(paiban);
    }

    @Override
    public int addPaiBan(Paiban paiban) {
        return paibanMapper.addPaiBan(paiban);
    }

    @Override
    public int delete(int doctorId) {
        return paibanMapper.delete(doctorId);
    }

    @Override
    public int count(int id) {
        return paibanMapper.count(id);
    }
}
